home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 5416 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  4.4 KB

  1. Path: cs.utexas.edu!not-for-mail
  2. From: wilson@cs.utexas.edu (Paul Wilson)
  3. Newsgroups: comp.lang.lisp,comp.lang.c++,comp.lang.c,comp.lang.misc
  4. Subject: GC & traditional allocators & textbooks
  5. Date: 4 Feb 1996 09:16:58 -0600
  6. Organization: CS Dept, University of Texas at Austin
  7. Message-ID: <4f2ila$6p8@jive.cs.utexas.edu>
  8. References: <rvillDL4v3n.I8r@netcom.com> <822848307snz@wildcard.demon.co.uk> <4eu5l9$5m9@jive.cs.utexas.edu> <823365355snz@wildcard.demon.co.uk>
  9. NNTP-Posting-Host: jive.cs.utexas.edu
  10.  
  11. In article <823365355snz@wildcard.demon.co.uk>,
  12. Cyber Surfer  <cyber_surfer@wildcard.demon.co.uk> wrote:
  13. >In article <4eu5l9$5m9@jive.cs.utexas.edu>
  14. >           wilson@cs.utexas.edu "Paul Wilson" writes:
  15. >
  16. >> >If you want to know about basic
  17. >> >garbage collecting, I'd recommend a computer science book, as it'll
  18. >> >probably be more up to date.
  19. >> 
  20. >> I have to disagree here.  I know of no textbooks with even a decent
  21. >> discussion of garbage collection. [...]
  22. >
  23. >Was I refering to modern GC? I'm not sure. I don't know of any books
  24. >on modern GC, but a book 20 years old seems to contain GC techniques
  25. >that many C/C++ programmers are unaware of. Even if that's the best
  26. >book on the subject, it could still enlighten a few programmers.
  27.  
  28. OK, agreed.  There are some fundamental algorithms that *are* in some
  29. textbooks and should be better known.
  30.  
  31. On the other hand, even some of the textbooks that do discuss the
  32. fundamental algorithms often propagate naive views about GC that are rather
  33. damaging.  (Henry Baker, Hans Boehm, and I have all put a fair amount
  34. of effort into trying to slow the spread of those myths on the net.)
  35.  
  36. This is also true of traditional allocators.  The history of allocator
  37. research has been a big mess---the literature is a bit of a disaster
  38. area---and the textbooks reflect this.  The analyses in the books are 
  39. shallow and largely wrong.  (This is less attributable to the textbooks
  40. authors than the weak discussions of GC.  It's not their fault that they
  41. can't summarize the gist of the literature and get it right, because
  42. the literature in general is disorganized, inconsistent, and often wrong.)
  43.  
  44. One of the problems in the area of traditional memory allocators is that
  45. people have taken one particular textbook far too seriously---Volume 1
  46. of Knuth's _The_Art_of_Computer_Programming_.  It was written in 1968,
  47. and some of it has turned out to be less than helpful.  It's still the
  48. standard reference, though, and other textbook writers often regurgitate
  49. its discussion of memory allocators.  Implementors often look at it and
  50. go and implement things that have been known to be bad since the early
  51. 1970's.  (Knuth is still tremendously influential in allocator work,
  52. despite the fact that he doesn't appear to have written anything about it
  53. in over 25 years.  This is not Knuth's fault, of course---inertia makes
  54. the world go 'round.)
  55.  
  56. "Modified First Fit" with the roving pointer is the clearest example.  It
  57. was a bad idea, and it was quickly shown to be bad, but some other textbook
  58. writers keep mindlessly cribbing from Knuth, and even some implementors still
  59. use it.
  60.  
  61. Obligatory positive comment:  the best textbook discussion of allocators
  62. that I know of is Tim Standish's in _Data_Structure_Techniques_.  He doesn't
  63. recognize the near-universal methodological problems with allocator studies,
  64. but he's unique in recognizing the basic data structure and algorithm issues
  65. in implementing allocators.
  66.  
  67. >> I suggest looking at the papers on our web site (in my .sig, below) which
  68. >> include two surveys (long and medium-sized) on GC.  (The long version will
  69. >> appear in Computing Surveys after some revision.)
  70.  
  71. This site also has our big survey on memory allocators from IWMM '95, which
  72. I hope will influence future textbooks.  It talks about empirical methodology
  73. as well as giving a fairly exhaustive treatment of implementation techniques.
  74.  
  75. >> There are also several
  76. >> other papers there by my research group and a bunch by other people
  77. >> (from the '91 and '93 OOPSLA GC workshops), and a big bibliography in
  78. >> LaTeX .bib format.  The web page also has links to Henry Baker's and Hans
  79. >> Boehm's web pages.
  80.  
  81.  
  82. -- 
  83. | Paul R. Wilson, Comp. Sci. Dept., U of Texas @ Austin (wilson@cs.utexas.edu)
  84. | Papers on memory allocators, garbage collection, memory hierarchies,
  85. | persistence and  Scheme interpreters and compilers available via ftp from 
  86. | ftp.cs.utexas.edu, in pub/garbage (or http://www.cs.utexas.edu/users/wilson/)      
  87.